package grgu.rud.glava1.b4;

import java.util.Scanner;

public class Del5and7 {

	public static void main(String[] args) {
		Scanner sc = new Scanner((System.in));
		System.out.print("Enter the amount of numbers: ");
		int n = sc.nextInt();
		int[] arr = new int[n];
		System.out.print("Enter the numbers ");
		for (int i = 0; i < arr.length; i++) {
			arr[i] = sc.nextInt();
		}
		int k = 0;
		System.out.print("The numbers that are divisible by 5 and 7: ");
		for (int i = 0; i < arr.length; i++) {
			if (arr[i] % 5 == 0 || arr[i] % 7 == 0) {
				k++;
				System.out.print(arr[i] + " ");
			}
		}
		if (k == 0) {
			System.out.println("\nNo numbers divisible by 5 and 7");
		}
	}

}
